package com.bindapp.adapter;

import android.view.View;

import com.bindapp.databinding.ItemJkglBinding;
import com.bindapp.listener.RecyclerItemClick;
import com.videogo.openapi.bean.EZDeviceInfo;

import java.util.List;

/**
 * Created by apple on 2018/7/5.
 */

public class JKGLAdapter extends BaseRcAdapter {



    public JKGLAdapter(List<Object> datas, int layoutId, int mVariableId, RecyclerItemClick listener) {
        super(datas, layoutId, mVariableId, listener);
    }

    @Override
    public void BinderHolder(BaseHolder holder, final int position) {
        if(holder instanceof ContentHolder){
            EZDeviceInfo info = (EZDeviceInfo)datas.get(position);
            ((ItemJkglBinding)holder.getBinding()).name.setText(position+"号摄像头");
            ((ItemJkglBinding)holder.getBinding()).setview.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onMoreClick(v,position);
                }
            });
            ((ItemJkglBinding)holder.getBinding()).setimg.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onMoreClick(v,position);
                }
            });
            //((ItemJkglBinding)holder.getBinding()).name.setText(info.getDeviceName());
        }

    }
}
